import request from '@/utils/request'

/**
 * 订单列表
 */
export function orderList(params) {
  return request({
    url: '/server/order/list',
    method: 'get',
    data: params
  })
}
/**
 * 订单详情
 */
export function orderInfo(params) {
  return request({
    url: '/server/order/info',
    method: 'get',
    data: params
  })
}
/**
 * 订单退款
 */
export function cancelOrder(params) {
  return request({
    url: '/server/order/refund',
    method: 'post',
    data: params,
    isFromData: 'true'
  })
}
/**
 * 订单-部分/全部退款 获取金额
 */
export function applyRefundInfo(params) {
  return request({
    url: '/server/order/applyRefundInfo',
    method: 'post',
    data: params,
    isFromData: 'true'
  })
}

/**
 * 订单-部分/全部退款  退款确认
 */
export function initiativeRefund(params) {
  return request({
    url: '/server/order/initiativeRefund',
    method: 'post',
    data: params,
    isFromData: 'true'
  })
}
/**
 * 订单-商品详情
 */
export function getSellChildren(params) {
  return request({
    url: '/server/order/detail',
    method: 'post',
    data: params,
    isFromData: 'true'
  })
}
